{#snippet field(title, amount)}
{$t(title)}
{s(amount, userLocale)}
{f(toFiat(amount, rate), currency, userLocale)}
{/snippet}
{#if amount < 0 && !confirmed && (type === types.lightning || type === types.bolt12)} {$t("payments.pending")} {:else} {$t(amount < 0 ? "payments.sent" : "payments.received")} {/if}
{#if p.with}
{direction}
{p.with.username}
{/if} {@render field("payments.amount", a)} {#if tip} {@render field("invoice.tip", tip)} {@render field("payments.total", a + (tip || 0))} {/if} {@render field("payments.networkFee", fee)} {#if ourfee > 0} {@render field("payments.platformFee", ourfee)} {/if}
{$t("payments.exchangeRate")}
1
= {f(rate, currency, userLocale, 0, 0)}
{s((1 * sats) / rate)} = {f(1, currency, userLocale, 0, 0)}
{$t("payments.date")}
{format(new Date(created), "h:mmaaa", { locale })} {format(new Date(created), "MMM d, yyyy", { locale })}
{#if type === types.ecash && amount < 0}
{$t("payments.ecashToken")}
{:else if type === types.fund}
{$t("payments.viewFund")}
{:else if memo?.includes("9734")} {@const eid = JSON.parse(memo).tags.find((t) => t[0] === "e")[1]}
{$t("payments.zappedEvent")}
{:else if memo}
{$t("payments.memo")}
{#if memo.includes("text/plain")} {JSON.parse(memo)[0][1]} {:else} {memo} {/if}
{/if} {#if type === types.lightning || type === types.bolt12}
{$t("payments.invoice")}
{hash}
{$t("payments.preimage")}
{#if ref} {ref} {:else}
{$t("payments.pending")}
{/if}
{/if} {#if type === "bitcoin" || type === "liquid"}
Txid
{txid}
copy(txid)} >
{/if} {#if path}
Path
{path}
copy(path)} >
{/if}